<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/templates/MainTemplate.xhtml">
	<ui:define name="content">
		<h:head></h:head>
		<h:body>

			<h:form id="formulario">
				<table>
					<tr>
						<td><p:selectOneMenu id="cbxUm" value="#{testeBean.valor1}"
								converter="selectOneUsingObjectConverter"
								items="#{testeBean.valoresPara1}">
								<f:selectItems value="#{testeBean.valoresPara1}" var="item"
									itemLabel="#{item.nome}" itemValue="#{item}" />
								<p:ajax update="formulario:cbxDois" process="formulario:cbxUm"
								listener="#{testeBean.preenche2}"/>
							</p:selectOneMenu></td>
					</tr>

					<tr>
						<td><h:selectOneMenu id="cbxDois" value="#{testeBean.valor2}">
								<f:selectItems value="#{testeBean.valoresPara2}" var="item2"
									itemLabel="#{item2}" itemValue="#{item2}" />
							</h:selectOneMenu></td>
					</tr>
					<tr><td>
						<p:commandButton action="#{loginBean.openLoginPopUp}"/>
					</td></tr>
				</table>
			</h:form>
		</h:body>
	</ui:define>
</ui:composition>
</html>